#!../mlisp

;;; Calculate fibonacci number

(load "arc.arc")

;;; nth fibonacci number
(def fib (n)
  (if (< n 2)
      n
    (+ (fib (- n 1))
       (fib (- n 2)))))

(let n (if (no *args*)
           10
         (coerce (car *args*) 'int))
  (prn (fib n)))
